Sustainability
Introduction
We all have a role to play in creating a sustainable future for ourselves and for generations to come. One of the most pressing issues we face today is the high level of energy consumption and the resulting impact on the environment. In 2021, the United States alone consumed a staggering 3,930 terawatt hours of energy, with a significant portion of it coming from non-renewable sources like fossil fuels. This has a detrimental effect on the environment, contributing to climate change, air and water pollution, and other environmental issues. Melting glaciers are threatening to flood our valuable land and cities. An estimated 15 million people around the world are at risk of suffering sudden, deadly, and destructive flooding events due to the warming climate. By caring about sustainability and making conscious choices about energy use, we can help to reduce our carbon footprint and create a more sustainable future.
At Amherst College, we have a responsibility to reduce our energy consumption and minimize our environmental impact. By reducing energy consumption, we can save money and preserve resources for future generations. In our analysis, we look at sustainability within a few freshman dorms at Amherst College. We then look at data across the world and compare energy consumption country-to-country. Our goal is to bring attention to just how much energy is consumed and consequently allow readers to analyze their own carbon footprints.
“Safe Space” by artist Kenesha Sneed
Why should anyone care about this?
The easy thing to do is to go about your life and pretend nothing is happening. Ignorance is bliss, right? If everyone reading this thought this way, our sustainability habits would worsen. Caring about sustainability and taking action to address climate change is not only important, it is absolutely crucial for the survival of our planet and all the living beings that call it home. Ignoring climate change and continuing with unsustainable practices not only harms the environment but also has serious social and economic consequences. We are already witnessing the devastating effects of climate change, including rising sea levels, more frequent and severe natural disasters, and the displacement of vulnerable populations. We cannot continue to turn a blind eye to these issues and expect things to get better on their own. It is our responsibility to take action and make the necessary changes in our daily lives, as well as advocate for systemic changes at a larger scale. By prioritizing sustainability and addressing climate change, we can create a better future for ourselves and for future generations.
Data Collection
The data from our Shiny App came from the Amherst College Office of Sustainability. As technology advances, the Sustainability Office has more access to resources that allow us to track energy consumption. In the newer dorms, the office is even able to track water usage. This data is not publicly available. As Amherst College students, we were able to meet with Weston Dripps, the Director of Sustainability. He kindly pulled the energy consumption data from North, South, James, and Stearns during the 2021-22 academic year. The original data is in an Excel file.
The worldwide data comes from Kaggle, a trusted web browser that gives users access to large, downloadable datasets. This dataset titled, “World Sustainability Dataset” tracks the sustainability of 173 countries over 19 years. We have data on the years 2000-2018. Below is a link to the original dataset.
Content
The figure below shows World GDP over time.
## Warning in right_join(., world_map, by = c(Country = "region")): Each row in `x` is expected to match at most 1 row in `y`.
## ℹ Row 1 of `x` matches multiple rows.
## ℹ If multiple matches are expected, set `multiple = "all"` to silence this
## warning.
## Warning in right_join(., world_map, by = c(Country = "region")): Each row in `x` is expected to match at most 1 row in `y`.
## ℹ Row 1 of `x` matches multiple rows.
## ℹ If multiple matches are expected, set `multiple = "all"` to silence this
## warning.
Findings
Looking at the energy usage at Amherst College inspired us to to explore other topics of sustainability in the world, and how countries differ in their sustainability. This directly lead to our interest in examining renewable energy consumption for each country on a map, by using a choropleth. Moreover, we used gganimate in order to distinguish between the change in renewable energy consumption from yearly changes. Renewable energy consumption is the proportion of energy that comes from renewable energy sources. This led us to looking at GDP as well, which stands for Gross Domestic Product. GDP is a measure for a countries economic output, as it measures a countries value of goods and services produced in their own country. Often countries with higher GDP have greater standards of living. We also look at annual based emissions of carbon dioxide, which is the amount of carbon dioxide that is released into the atmosphere. Increased emissions are often caused by burning fossil fuels and large industrialism. Another variable we looked at is life expectancy at birth which is strongly related to a country’s economic status and health care oppertunities. The final variable is access to electricity, and it is affected by a country’s economic status as well.
Links
Clicking on the link below will take you to our Shiny App. Here, we have used actual energy consumption data from the Office of Sustainability at Amherst College to measure energy consumption during the 2021-2022 academic year. In the first plot, which is a line chart, we looked at a time series where we tracked the average day of energy consumption in each dorm. The energy consumption was measured in 5 minutes increments and in Kilowatts Per Hour (kw/h). In the app, the user is able to select which freshman dorm they desire to inspect, and whether they want to measure the energy consumption in total energy every 5 minutes or energy usage per capita. In the following section of the app, seasonal energy usage shows the seasonal differences in energy consumption for each dorm from the use of bar charts. In this panel of the Shiny app, you can select which season you would like to view as well as whether you want the data to be presented in total energy per 5 minutes or in energy per capita. The last feature of the shiny app displays energy usage per day type. This allows you to select energy use for any day of the week, as well are giving one the ability to plot either weekdays or weekends. This is shown through bar graphs are well.
Link to the Sustainability Dataset: https://www.kaggle.com/datasets/truecue/worldsustainabilitydataset/code?resource=download
Visualizations
Visualizations, particularly interactive ones, will be well-received. That said, do not overuse visualizations. You may be better off with one complicated but well-crafted visualization as opposed to many quick-and-dirty plots. Any plots should be well-thought-out, properly labeled, informative, and visually appealing.
If you want to include dynamic visualizations or tables, you should explore your options from packages that are built from htmlwidgets. These htmlwidgets-based packages offer ways to build lighterweight, dynamic visualizations or tables that don’t require an R server to run! A more complete list of packages is available on the linked website, but a short list includes:
Tables
DT package
The DT package is great for making dynamic tables that can be displayed, searched, and filtered by the user without needing an R server or Shiny app!
Note: you should load any packages you use in the setup
code chunk as usual. The library() functions are shown
below just for demonstration.
library(DT)
mtcars %>%
select(mpg, cyl, hp) %>%
datatable(colnames = c("MPG", "Number of cylinders", "Horsepower"),
filter = 'top',
options = list(pageLength = 10, autoWidth = TRUE))kableExtra package
You can also use kableExtra for customizing HTML tables.
library(kableExtra)
summary(cars) %>%
kbl(col.names = c("Speed", "Distance"),
row.names = FALSE) %>%
kable_styling(bootstrap_options = "striped",
full_width = FALSE) %>%
row_spec(0, bold = TRUE) %>%
column_spec(1:2, width = "1.5in") | Speed | Distance |
|---|---|
| Min. : 4.0 | Min. : 2.00 |
| 1st Qu.:12.0 | 1st Qu.: 26.00 |
| Median :15.0 | Median : 36.00 |
| Mean :15.4 | Mean : 42.98 |
| 3rd Qu.:19.0 | 3rd Qu.: 56.00 |
| Max. :25.0 | Max. :120.00 |
Images
Images and gifs can be displayed using code chunks:
“Safe Space” by artist Kenesha Sneed
This is a figure caption
You may also use Markdown syntax for displaying images as shown below, but code chunks offer easier customization of the image size and alignment.